package ro.gillardon.commons.mot;

import java.time.LocalDate;

import ro.gillardon.commons.Conditions;
import ro.gillardon.commons.enums.City;

/**
 * Abstract class for storing common attributes of different means of transport.
 */
public abstract class AbstractMotConditions extends Conditions {

  /** The starting point. */
  private final City from;

  /** The destination. */
  private final City to;

  /** The departure date. */
  private final LocalDate departureDate;

  /** The arrival date. */
  private final LocalDate arrivalDate;

  /** The travel class. */
  private final MotClass motClass;

  /**
   * Instantiates a new abstract MeansOfTransport conditions.
   *
   * @param from the starting point
   * @param to the destination
   * @param departureDate the departure date
   * @param arrivalDate the arrival date
   * @param motClass the class
   */
  protected AbstractMotConditions(final City from, final City to, final LocalDate departureDate,
    final LocalDate arrivalDate, final MotClass motClass) {
    this.from = from;
    this.to = to;
    this.departureDate = departureDate;
    this.arrivalDate = arrivalDate;
    this.motClass = motClass;
  }

  /**
   * Gets the starting point.
   *
   * @return the starting city
   */
  public City getFrom() {
    return this.from;
  }

  /**
   * Gets the destination.
   *
   * @return the destination city
   */
  public City getTo() {
    return this.to;
  }

  /**
   * Gets the departure date.
   *
   * @return the departure date
   */
  public LocalDate getDepartureDate() {
    return this.departureDate;
  }

  /**
   * Gets the arrival date.
   *
   * @return the arrival date
   */
  public LocalDate getArrivalDate() {
    return this.arrivalDate;
  }

  /**
   * Gets the class.
   *
   * @return the class
   */
  public MotClass getMotClass() {
    return this.motClass;
  }

}
